﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ducu.GLB.Global
{
    public enum Status
    {
        Empty,

        [Description("请假")]
        Leave,
        
        [Description("未完成")]
        NotComplte,
        
        [Description("待完成")]
        WaitComplete,
        
        [Description("提交")]
        WaitAccept,
        
        [Description("验收")]
        Accepted,
        
        [Description("拒绝验收")]
        Refused,
        
        [Description("质疑")]
        Question,
        
        [Description("重新提交")]
        Resume,
        
        [Description("未来")]
        Future,

        [Description("休息")]
        Rest
    }

    public static class ExtensionMethod
    {
        public static string ToTaskHistory(this Status source)
        {
            switch (source)
            {
                case Status.WaitAccept:
                    return "提交";
                case Status.Accepted:
                    return "验收";
                case Status.Refused:
                    return "拒绝";
                case Status.Question:
                    return "质疑";
                case Status.Empty:
                    return "回复";
                case Status.Resume:
                    return "重新提交";
                case Status.Leave:
                    return "请假";
                default:
                    //TODO:
                    throw new Exception();
            }

        }
    }
}
